<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/bzbs/manager/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/bzbs/manager/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/bzbs/manager/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/bzbs/manager/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/bzbs/manager/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>放映厅列表</title>
</head>
<body>
	<%-- <font color="red"> <c:choose>
			<c:when test="${msg=='addSuccess'}">添加成功</c:when>
			<c:when test="${msg=='addError'}">添加失败</c:when>
			<c:otherwise></c:otherwise>
		</c:choose>
	</font>
	<font color="red"> <c:choose>
			<c:when test="${info=='addSuccess'}">修改成功</c:when>
			<c:when test="${info=='addError'}">修改失败</c:when>
			<c:otherwise></c:otherwise>
		</c:choose>
	</font> --%>

	<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" data-title="添加自习室" data-href="room_add.jsp" onclick="Hui_admin_tab(this)" href="room_add.jsp"><i class="Hui-iconfont">&#xe600;</i> 添加自习室</a></span></div>
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
			<thead>
				<tr class="text-c">
					<th width="80">ID</th>
					<th width="100">自习室名称</th>
					<th width="80">行数</th>
					<th width="80">列数</th>
					<th width="120">具体地址</th>
					<th width="90">操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${requestScope.roomList}" var="room">
				<tr class="text-c">
					<td>${room.roomId}</td>
					<td class="text-l"><a href="../seat/query.do?roomId=${room.roomId}">${room.roomName}</a></td>
					<td>${room.rows}</td>
					<td>${room.cols}</td>
					<td>${room.address}</td>
					<td class="f-14 td-manage"> <a style="text-decoration:none" class="ml-5" onClick="article_edit('放映厅编辑','HallGetServlet','${hall.get('hallid')}')" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> <a style="text-decoration:none" class="ml-5" onClick="article_del(this,'${hall.get('hallid')}')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
				</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/bzbs/manager/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/bzbs/manager/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/bzbs/manager/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="/bzbs/manager/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/bzbs/manager/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="/bzbs/manager/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">


/*资讯-添加*/
function article_add(title,url,w,h){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*资讯-编辑*/
function article_edit(title,url,id,w,h){
	var index = layer.open({
		type: 2,
		title: title,
		content: url+"?hallid="+id
	});
	layer.full(index);
}
/*资讯-删除*/
function article_del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
		$.ajax({
			type: 'POST',
			url: 'HallDeleteServlet?hallid='+id,
			dataType: 'json',
			success: function(data){
				$(obj).parents("tr").remove();
				layer.msg('已删除!',{icon:1,time:1000});
			},
			error:function(data) {
				console.log(data.msg);
			},
		});		
	});
}



</script> 
</body>
</html>